package mapkit
{
	import flash.events.Event;

	public class MapLayerEvent extends Event
	{
		public static const LOAD:String="mapLayerLoad";
		public static const UNLOAD:String="mapLayerUnload";

		private var _layer:MapLayer=null;

		override public function get target():Object
		{
			return _layer;
		}

		private var _map:Map;

		final public function get map():Map
		{
			return _map;
		}

		public function MapLayerEvent(type:String, layer_:MapLayer, map_:Map)
		{
			super(type, true, true);

			switch (type)
			{
				case MapLayerEvent.LOAD:
				case MapLayerEvent.UNLOAD:
					_layer=layer_;
					_map=map_;
					break;
			}
		}

	}
}